

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<link type="text/css" rel="stylesheet" href="${createLinkTo(dir:'css/csslxh',file:'lxh.css')}">
	<script type="text/javascript" src="${createLinkTo(dir:'js',file:'listok.js')}"></script>
	<title>RichOther List</title>
</head>

<style>
	.noteContent {color:#666666;width:100%;margin:0 auto; border-bottom:1px dotted #999999; padding-bottom:0px;padding-top:5px;}	
</style>

<script language="javascript">
function doQuery()
{
	var nametj = trim(document.all.nametj.value);
	nametj = encodeURI(nametj);
	location.href = "list?nametj="+nametj+"&flag=${flag}";
}
</script>

<body class="scrollbarStyle" style="margin:0; overflow:auto">

<table width="100%" height="23" border="0" cellpadding="0" cellspacing="0" background="../imagesmain/grayListBg.gif">
  <tr>
    <td width="2">&nbsp;</td>      
    <td width="70" align="center">
    	<g:link action="create" params="[flag:flag]" style="text-decoration:none;color:#000000">
    		<img src="${createLinkTo(dir:'imagesmain',file:'grayAdd.gif')}" border="0" style="margin-bottom:-1px; margin-right:3px">创建内容
    	</g:link>
    </td>
    <td width="100">&nbsp;</td>    

	<g:lxhSortCol property="createDate" title="按创建时间排序" params="[flag:flag]" background="" width="130" style="padding-top:2px"/>
	<g:lxhSortCol property="lastUpdateDate" title="按修改时间排序" params="[flag:flag]" background="" width="130" style="padding-top:2px"/>

    <td width="15">&nbsp;</td>    
   
    <td>&nbsp;</td>    
	<td align=right width="180">
		<table width="100%" height="16" cellpadding="0" cellspacing="0">
			<tr>
			    <td align="right" style="padding-top:3px">标题&nbsp;</td>
				<td width="20" background="../imagesmain/appleTextLeft.gif">&nbsp;</td>
				<td width="110" valign="middle" background="../imagesmain/appleTextMiddle.gif">
					<input name="nametj" value="${nametj}" class="textApple" onkeypress="if(event.keyCode==13) doQuery();">
				</td>
				<td width="8" background="../imagesmain/appleTextRight.gif">&nbsp;</td>
			</tr>
		</table>
	</td>	
	<td width="10">&nbsp;</td>		
  </tr>  
</table>

<g:if test="${flash.message}">
	<div class="message">${flash.message}</div>
</g:if>

<br>


<table width="800" align="center" cellpadding="0" cellspacing="0" style="margin-top:0px"> 
	    
    <g:each in="${richOtherInstanceList}" status="i" var="richOtherInstance">
    	<tr>      
        	<td style="padding-top:5px">
        		<table width="100%">
        			<tr>
        				<td style="padding-left:16px;padding-right:16px"><g:link action="show" id="${richOtherInstance.id}"><span style="color:#cc0000;font-size:14px;font-weight:bold">${richOtherInstance.title?.encodeAsHTML()}</span></g:link></td>
        			<tr>
        			
        			<tr>
        				<td style="padding-left:16px;padding-right:16px;line-height:20px">
        				<g:if test="${richOtherInstance.content.length() <= 310}">
        					${richOtherInstance.content}
        				</g:if>
        				<g:else>
        					${richOtherInstance.content.substring(0,310)}<span style="color:#cc0000;font-size:14px;">......</span>
        				</g:else>
        				</td>
        			</tr>

        			<tr>
        				<td>
        					<div class="noteContent">
        					    <span style="padding-left:16px">
		        				           创建时间：<g:formatDate format="yyyy-MM-dd" date="${richOtherInstance.createDate}"/>
		        					修改时间：<g:formatDate format="yyyy-MM-dd" date="${richOtherInstance.lastUpdateDate}"/>
		        					|
		        				    <g:link action="edit" id="${ richOtherInstance.id }" params="[flag:flag]">修改内容</g:link>&nbsp;
		                			<g:link action="delete" id="${ richOtherInstance.id }" params="[flag:flag]" onclick="return confirm('真得要删除吗?');">删除内容</g:link>
	                			</span>
                			</div>
                		</td>
        			</tr>              
        		</table>
            </td>
        </tr>
	</g:each>

	                
</table>      


<table width="800" align="center">
	<tr>
        <td align="right" style="height:30px; padding-right:2px; color:#186B86">
        	<g:paginate total="${totalRow}" params='[nametj:"${nametj}", flag:"${flag}"]'/>
        </td>
	</tr> 
</table>

         
</body>
</html>
